package com.alks.function.mapper.board;

import com.alks.entity.data.entity.ExportPlanInfo;
import com.alks.entity.data.entity.PcBoard;
import com.alks.entity.data.entity.board.FinanceOtherCharges;
import com.alks.entity.data.entity.board.SysDictData;
import com.alks.entity.data.entity.dispatch.UserOemRelation;
import com.alks.entity.data.entity.dispatch.Vendor;
import com.alks.function.controller.finance.borad.ExportPlan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface BoardMapper {

    int insert(PcBoard pcBoard);

    int delete(PcBoard pcBoard);

    List<ExportPlan> selectExportPlanList(ExportPlan exportPlan);

    Map<String, Object> sumStorage(ExportPlan exportPlan);

    Map<String, Object> sumStorage2(ExportPlan exportPlan);

    List<ExportPlanInfo> selectExportPlanInfoList(ExportPlanInfo exportPlanInfo);

    int updateExportPlanInfo(ExportPlanInfo exportPlanInfo);

    int queryNumbyCollectDetail(ExportPlanInfo exportPlanInfo);

    int queryNumbyOemOutDetail(ExportPlanInfo exportPlanInfo);

    int updateAddOEMPrice(ExportPlanInfo exportPlanInfo);

    ExportPlan selectExportPlanHeadById(ExportPlan head);

    int insertBoardHead(ExportPlan head);

    int updateExportPlanHead(ExportPlan head);

    void deleteByRinvoiceNo(ExportPlan exportPlan);

    int insertBatch(List<ExportPlan> details);

    ExportPlan queryArAmtByInvoiceNo(@Param("companyId") String companyId, @Param("invoiceNo") String invoiceNo);

    int queryRecAmtByInvoiceNo(@Param("companyId") String companyId, @Param("invoiceNo") String invoiceNo);

    void updateCfmFlag(ExportPlan param);

    int insertOther(ExportPlan head);

    void deleteOtherByInvNo(ExportPlan exportPlan);

    void deleteByRowId(ExportPlan exportPlan);

    int updateCreditNo(List<ExportPlan> records);

    List<PcBoard> listObjects(@Param("invoiceNo") String invoiceNo, @Param("companyId") String companyId);

    List<FinanceOtherCharges> loadInSumList(FinanceOtherCharges financeOtherCharges);

    Map<String, Object> sumOtherStorage(FinanceOtherCharges financeOtherCharges);

    void deleteOtherDetail(@Param("list") List<FinanceOtherCharges> list, @Param("companyId") String companyId);

    Integer selectMaxChargesNo(String companyId);

    void addOtherCharges(List<FinanceOtherCharges> list);

    void updateDutyAmount(FinanceOtherCharges financeOtherCharges);

    void updateOtherCfmFlag(FinanceOtherCharges param);

    void updateAoaMonth(List<FinanceOtherCharges> list);

    List<FinanceOtherCharges> custInvNoCombo(@Param("companyId") String companyId, @Param("searchKey") String searchKey);

    List<SysDictData> selectDictDataList(SysDictData dictData);

    List<UserOemRelation> selectUserOemRelationList(@Param("companyId") String companyId, @Param("id") Integer id);

    List<Vendor> searchAll(@Param("companyId") String companyId, @Param("searchKey") String supplierName);

    void updateShipDate(List<ExportPlan> records);

    Integer getByArDetail(ExportPlan exportPlan);

    void insertIntoLog(@Param("exportPlan") ExportPlan exportPlan, @Param("userName") String userName);
}
